package com.pxmeta.party.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pxmeta.user.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 公会
 * </p>
 *
 * @author wcl
 * @since 2023-02-05
 */
@TableName("kt_association_user")
@ApiModel(value = "公会用户", description = "公会用户表")
@Data
public class AssociationUser implements Serializable {

    @ApiModelProperty("主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("公会id")
    private Long associationId;

    @ApiModelProperty("签约时长")
    private Integer signingTime;

    @ApiModelProperty("签约状态")
    private Integer status;

    @ApiModelProperty("分成比例")
    private BigDecimal commissionRatio;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户详情")
    private User user;

    @ApiModelProperty(value = "本周收益")
    private BigDecimal weekEarnings;

    @ApiModelProperty(value = "总收益")
    private BigDecimal totalEarnings;

    @ApiModelProperty(value = "是否是管理")
    private Boolean isAdmin;


    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;
}
